package com.and9.mchen.mcmusic.struts.action.base;

import java.util.Map;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.interceptor.ApplicationAware;
import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;
import org.apache.struts2.util.ServletContextAware;

import com.opensymphony.xwork2.ActionSupport;

public class BaseAction extends ActionSupport implements SessionAware,RequestAware,
ApplicationAware,ServletContextAware{

	/**
	 * 
	 */
	private static final long serialVersionUID = -620263888067393027L;

	protected Map<String, Object> Session;
	protected Map<String, Object> Request;
	protected Map<String, Object> Application;
	protected ServletContext context;


	public Map<String, Object> getApplication() {
		return Application;
	}

	public Map<String, Object> getRequest() {
		return Request;
	}

	public Map<String, Object> getSession() {
		return Session;
	}

	public void setApplication(Map<String, Object> Application) {
		this.Application=Application;
	}

	public void setRequest(Map<String, Object> Request) {
		this.Request=Request;
	}

	public void setSession(Map<String, Object> Session) {
		this.Session=Session;
	}

	public static HttpServletRequest getServletRequest(){
		return ServletActionContext.getRequest();
	}

	public void setServletContext(ServletContext context) {
		this.context=context;
	}

}

